//
//  QNAuthorizationHelper.h
//  QNReuseTool
//
//  Created by rsh on 2019/10/15.
//  Copyright © 2019年 rsh. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface QNAuthorizationHelper : NSObject



//相册权限
+ (void)requestAblumAuthorityWithCompletionHandler:(void (^)(NSError *))handler;

//照相机\麦克风权限
+ (BOOL)requestMediaCapturerAccessWithHandler:(void (^)(NSError *))handler;


/*
 
 用法：
 
 #pragma mark - Action && Notication
 - (void)goRecordVC
 {
 //权限申请
 __weak typeof(self) weakSelf = self;
 [QNAuthorizationHelper requestMediaCapturerAccessWithHandler:^(NSError *error) {
 if (error)
 {
 [UIAlertView showMessage:@"请开启照相机/麦克风权限"];
 }
 else
 {
 [QNAuthorizationHelper requestAblumAuthorityWithCompletionHandler:^(NSError *error) {
 if (error)
 {
 [UIAlertView showMessage:@"请开启照片权限"];
 }
 else
 {
 QNRecordVC *push = [[QNRecordVC alloc] init];
 [weakSelf.navigationController pushViewController:push animated:YES];
 }
 }];
 }
 }];
 }
 
 */


@end
